<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>管理员</title>
</head>
<body>
<center>试题管理</center>
<h3 align="right"><a href="../admin/index.php?c=index&m=index">返回</a></h3>
<?php 

	$row = $data['test'];
	//var_dump($row);
	$tid = $row['tid'];
	$content = $row['content'];
	$score = $row['score'];
	$op1 = $row['op1'];
	$pic1 = $row['pic1'];
	$op2 = $row['op2'];
	$pic2 = $row['pic2'];
	$op3 = $row['op3'];
	$pic3 = $row['pic3'];
	$op4 = $row['op4'];
	$pic4 = $row['pic4'];
	$ans = $row['ans'];
	$pid = $row['pid'];
 ?>

<form method="post" action="index.php?c=index&m=updatetest" enctype="multipart/form-data">
	<table align="center" border="1">
		<tr>
			<th>试题编号</th>
			<th><input type="hidden" name="tid" value=<?php echo $tid; ?>></th>
		</tr>
		<tr>
			<th>问题</th>
			<th><input type="text" name="content" value="<?php 
          echo $content;?>"></th>
		</tr>
		<tr>
			<th>分数</th>
			<th><input type="text" name="score" value="<?php 
          echo $score;?>"></th>
		</tr>
		<tr>
			<th>答案一</th>
			<th><input type="text" name="op1"  value= <?php echo $op1; ?>></th>
		</tr>
		<tr>
			<th>图片一</th>
			<th><img src="<?php echo $pic1; ?>" width=100 height=80>
          <input type="file" name="pic1"></th>
		</tr>
		<tr>
			<th>答案二</th>
			<th><input type="text" name="op2"  value= <?php echo $op2; ?>></th>
		</tr>
		<tr>
			<th>图片二</th>
			<th><img src="<?php echo $pic2; ?>" width=100 height=80>
          <input type="file" name="pic2"></th>
		</tr>
		<tr>
			<th>答案三</th>
			<th><input type="text" name="op3"  value= <?php echo $op3; ?>></th>
		</tr>
		<tr>
			<th>图片三</th>
			<th><img src="<?php echo $pic3; ?>" width=100 height=80>
          <input type="file" name="pic3"></th>
		</tr>
		<tr>
			<th>答案四</th>
			<th><input type="text" name="op4"  value= <?php echo $op4; ?>></th>
		</tr>
		<tr>
			<th>图片四</th>
			<th><img src="<?php echo $pic4; ?>" width=100 height=80>
          <input type="file" name="pic4"></th>
		</tr>
		<tr>
			<th>正确答案</th>
			<th><input type="text" name="ans" value=<?php echo $ans; ?>></th>
		</tr>
		<tr>
			<th>试题分类</th>
			<th><input type="text" name="pid" value=<?php echo $pid; ?>></th>
		</tr>
		<tr>
			<th></th>
			<th><input type="reset"  value="重置">
			<input type="submit" value="更新"></th>
		</tr>
	</table>
</form>
</body>
</html>